package com.pat.web.services;

import com.pat.web.model.Pet;

public class PetService {

	//判断一个用户是否有同名宠物
	public static boolean checkNickname(Long userId, String petNickname) {
		Pet existed = Pet.dao.findFirst("select * from pet where user_id = ? and pet_nick = ? and is_deleted = 0",
				userId, petNickname);
		if (existed != null)
			return true;
		return false;
	}
}
